/*
 * led.h
 *
 * Created: 14/01/2013 15:23:58
 *  Author: marionse
 */ 


#ifndef MOD_LED_H_
#define MOD_LED_H_

#include "custom_type.h"

/**
* \brief configuration structure for physical led
*/
typedef struct
{
	// hardware definition
	volatile Int8U *io_ddr;		// DDR register of io to use
	volatile Int8U *io_port;	// PORT register of io to use
	Int8U io_bit;				// BIT of io to use in the register
}SLedConfig;

/**
* \brief initialized led
*
* \return TRUE if success
*/
Boolean ModLedInit( void );

/**
* \brief Tick function to update real state of led according to logical state
*/
void ModLedTick( void );

/**
* \brief public function to set a led on
*/
void ModLedSetOn( Int8U i_led );

/**
* \brief public function to set a led off
*/
void ModLedSetOff( Int8U i_led );

/**
* \brief public function to set a led blinking
*/
void ModLedSetBlink( Int8U i_led );


#endif /* MOD_LED_H_ */